<template>
  <div class="nodata_box" :style="{height: height}">
    <div class="nodata_bg" :style="{background: `url(${noDataImage}) no-repeat center center`}"></div>
    <span>{{text}}</span>
  </div>
</template>

<script>
import noDataImage from './img/zwsj.png';
export default {
  name: 'NoData',
  props: {
    text: {
      type: String, // 动态传值
      default: '抱歉，暂无数据' // 默认值
    },
    height: {
      type: String // 比如：'600px,100vh,100vw'
    },
    noDataImage: {
      default: noDataImage // 默认值
    }
  }
};
</script>

<style lang='scss' scoped>
.nodata_box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #999999;
  font-size: 14px;
  .nodata_bg {
    width: 200px;
    height: 200px;
    margin-left:15px;
  }
}
</style>

